/**
 * GB28181 对sip命令的封装
 */
const digest = require('sip/digest');
const sip = require('sip');
const settingModel = require("../model/setting");
/**
 * 封装发送的命令
 */
let command = {
    /**
     * 要求客户端重新登陆
     * @param {*} rq
     */
    registerFailAck: async function (rq) {
        const sipSetting = await settingModel.load();
        let session = {realm: sipSetting.server_realm};
        return digest.challenge(session, sip.makeResponse(rq, 401, 'Unauthorized'));
    },
    //TODO: 云台移动
    move: function () {

    },
    //TODO: 放大缩小
    zoom: function () {

    }
};

module.exports = command;
